<?php
/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: Sam
 * date: 2020-11-16 16:21:19
 * @LastEditors: Sam
 * @LastEditTime: 2021-12-21 17:27:41
 */
use think\facade\Route;

Route::group(function(){
    Route::post('login', 'oauth/oauth_login'); //授权
    Route::post('get_session_key', 'oauth/get_session_key'); //授权 
});


Route::group(function(){
    Route::post('perfect_info', 'oauth/perfect_info'); //更新头像昵称
    Route::post('de_unionid', 'oauth/de_unionid'); //解密unionid
    Route::post('de_mobile', 'oauth/de_mobile'); //解密手机号
})->middleware(\app\api\middleware\TokenMiddleware::class,true)->allowCrossDomain();


Route::miss(function() {
    return json(['code'=>-1,'msg'=>'非法请求']);
});

